package dyyx;

import net.agkn.hll.HLL;

public class Hello {
	
	public static void main(String[] args) throws Exception {
		
		System.out.println("hello,hyperloglog");
		
		//number of bucket and bits per bucket
		HLL hll = new HLL(16, 8); 
		
		for(int i=0;i<100;i++){
			hll.addRaw(i);
		}
		System.out.println(hll.cardinality());
		
		for(int i=0;i<100000;i++){
			hll.addRaw(i);
		}
		System.out.println(hll.cardinality());
		
        hll = new HLL(20, 8); 
		
		for(int i=0;i<100000;i++){
			hll.addRaw(i);
		}
		System.out.println(hll.cardinality());
		
		
        hll = new HLL(30, 8); 
		
		for(int i=0;i<100000;i++){
			hll.addRaw(i);
		}
		System.out.println(hll.cardinality());
	
	}
}
